package com.btpj.module_main.adapter

import com.btpj.module_main.R
import com.btpj.module_main.data.entity.NavItemDetail
import com.btpj.module_main.databinding.ListItemNavItemDetailBinding
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder

class NavItemDetailAdapter :
    BaseQuickAdapter<NavItemDetail, BaseDataBindingHolder<ListItemNavItemDetailBinding>>(
        layoutResId = R.layout.list_item_nav_item_detail
    ) {
    override fun convert(
        holder: BaseDataBindingHolder<ListItemNavItemDetailBinding>,
        item: NavItemDetail
    ) {
        val binding = holder.dataBinding
        if (binding != null) {
            binding.navItemDetail = item
            binding.executePendingBindings()
        }
    }
}